d9774040ae8f46838553e972bb3d99490dc496e7,core/src/main/java/tachyon/worker/eviction/EvictLRU.java,EvictLRU,getDirCandidate,#StorageDir[]#Set#number#,41

Before Change


      if (dirCandidate == null) {
        return null;
      } else {
        blockSize = dirCandidate.getBlockSize(blockId);
      }
      // Add info of the block to the list
      blockInfoList.add(new BlockInfo(dirCandidate, blockId, blockSize));
      dir2BlocksToEvict.put(dirCandidate, blockId);
      dir2LRUBlocks.remove(dirCandidate);
      long evictionBytes;
      // Update eviction size for this StorageDir
      if (sizeToEvict.containsKey(dirCandidate)) {
        evictionBytes = sizeToEvict.get(dirCandidate) + blockSize;
      } else {
        evictionBytes = blockSize;
      }

After Change


        return null;
      }
      long blockId = candidate.getSecond();
      long blockSize = dir.getBlockSize(blockId);
      // Add info of the block to the list
      blockInfoList.add(new BlockInfo(dir, blockId, blockSize));
      dir2BlocksToEvict.put(dir, blockId);
      dir2LRUBlocks.remove(dir);
      long evictBytes;
      // Update eviction size for this StorageDir
      if (sizeToEvict.containsKey(dir)) {
        evictBytes = sizeToEvict.get(dir) + blockSize;
      } else {
        evictBytes = blockSize;
      }